#ifndef _Distributions_H_
#define _Distributions_H_

//
// Distributions.h
//
// Created by TB on 11/30/11.
// Copyright 2011 BNL. All rights reserved.
//

#include <list>

#include <Rtypes.h>
#include <TObject.h>

#ifndef __CINT__ // CINT hates BOOST. It's a BOOST-racist. It's BOOSTist.
#include <boost/shared_ptr.hpp>
#endif

namespace tppmc {
   
   class Configuration;
   class PartonDistribution;
   class FragmentationFunction;
   
   /**
    Collection of all distribution functions utilised in the Monte Carlo,
    namely:
    <ul>
    <li>Unpolarised parton distribution</li>
    <li>Transversity distribution</li>
    <li>Sivers distribution</li>
    <li>Fragmentation function (with or without Collins)</li>
    </ul>
    */
   class Distributions : public TObject {
      
   public:
      
      /** Default constructor */
      Distributions();
      
      /** Set the distributions from the flags held by a configuration */
      Distributions(const Configuration&);
      
      /** Destructor */
      virtual ~Distributions();
      
      virtual void Speak() const;
      
#ifndef __CINT__ // CINT hates BOOST.
      typedef boost::shared_ptr<PartonDistribution> PartonPtr;
      typedef boost::shared_ptr<FragmentationFunction> FragPtr;
      
      /** Unpolarised PDF */
      virtual PartonPtr Unpolarised() const;
      
      /** Sivers PDF */
      virtual PartonPtr Sivers() const;
      
      /** Transversity PDF */
      virtual PartonPtr Transversity() const;
      
      /** Fragmentation function */
      virtual FragPtr Fragmentation() const;
      
      /**
       Returns all assigned parton distribution functions:
       unpolarised, Sivers & transversity.
       Any that are not set will be absent.
       */
      virtual std::list<PartonPtr> Pdfs() const;
      
   protected:

      PartonPtr mUnpolarised;
      PartonPtr mSivers;
      PartonPtr mTransversity;
      
      FragPtr mFragmentation;
#endif // __CINT__

      ClassDef(tppmc::Distributions, 1)
   };
   
   
} // namespace tppmc

#endif
